
<html><head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <link rel="dns-prefetch" href="//tmall.fc62.com">
    <link rel="dns-prefetch" href="http://uploadfile.fc62.com">

    <title>签到验证</title>
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="https://tmall.fc62.com/mobile/themesmobile/68ecshopcom_mobile/css/queren.css">
    <link rel="stylesheet" href="https://tmall.fc62.com/mobile/themesmobile/68ecshopcom_mobile/css/generate.css">
    <link rel="stylesheet" href="https://tmall.fc62.com/mobile/themesmobile/68ecshopcom_mobile/css/check_phone.css" />
    <script type="text/javascript" src="https://tmall.fc62.com/mobile/themesmobile/68ecshopcom_mobile/js/layer_mobile/layer.js"></script>
    <link href="https://tmall.fc62.com/mobile/themesmobile/68ecshopcom_mobile/js/layer_mobile/need/layer.css?2.0" type="text/css" rel="styleSheet" id="layermcss">
    <script src="https://tmall.fc62.com/mobile/themesmobile/68ecshopcom_mobile/js/jquery.1.9.1.js"></script>
    <script type="text/javascript" src="https://tmall.fc62.com/mobile/themesmobile/68ecshopcom_mobile/js/rem.js"></script>
    <script type="text/javascript" src="http://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
</head>
<style>
    .errinfo,.choosebox{
        display: none;
    }
</style>
<body class="body_tj" style="font-size: 16px;">

<div id="tbh5v0">
    <div class="addressmone">
        <ul>
            <li>
                <span style="color: #333;">请输入您签到时的电话号码</span>
                <em>
                    <input type="number" pattern="[0-9]*" name="" id="phone" value="">
                </em>
            </li>
            <li>
                <span style="color: #333;">请输入您签到时家长的姓名</span>
                <em>
                    <input type="text" name="" id="signname" value="">
                </em>
            </li>
            <p class="errinfo">您输入的信息不正确，可能原因：</p>
            <p class="errinfo">1、已迟到超过15分钟；</p>
            <p class="errinfo">2、没有签到参加“2021高考总复习规划课”，不能领取。</p>
        </ul>

        <div class="buttonbox">
            <input type="submit" value="验证" class="dotm_btn1">
            <div class="choosebox">
                <p>《高考一轮复习方向作业》 赠书书店无售， 不能单独购买。 因迟到或未参会错过领取者,可通过购买直播间任意产品领取。</p>
                <a href="https://shoptest.fc62.com/index_activity/215?source=sc" class="buttonbuy">通过购买产品领取</a>
                <a class="buttonbuy buttonclose">不要了</a>
            </div>
        </div>
    </div>
</div>
<script>
    var ttl={$ttl};
    $(function(){
        $('.buttonclose').click(function(){
            WeixinJSBridge.call('closeWindow');
        });
        $('.dotm_btn1').click(function(){
            var phone = $('#phone').val();
            var signname = $('#signname').val();
            if(!(/^1[3456789]\d{9}$/.test(phone))) {
                layer.open({
                    content: '请输入正确的手机号码',
                    skin: 'msg',
                    time: 2 //2秒后自动关闭
                });
                $("#phone").focus();
                return false;
            }
            if(signname == '' || signname == null) {
                layer.open({
                    content: '请输入您签到时的姓名',
                    skin: 'msg',
                    time: 2 //2秒后自动关闭
                });
                $("#phone").focus();
                return false;
            }
            var index = layer.open({type: 2});
            $('.dotm_btn1').attr("disabled",true);
            let ids = '{$row['id']}';
            $.ajax({
                type: 'post',
                url:"/index/ques/checks" ,
                data:{mobile:phone,ids:ids,signname:signname,ttl:ttl},
                success: function(data){
                    layer.close(index);


                    if(data.code == 0){
                        $('.dotm_btn1').removeAttr("disabled");
                        $('.dotm_btn1').val('重新验证');
                        $(' .errinfo,.choosebox').fadeIn();
                        return false;
                    }else{
                       location.reload();
                    }


                }
            });

        });
    });
</script>


</body></html>